package com.lagou.client.boot;

import com.lagou.client.config.RpcConsumer;
import com.lagou.service.UserService;

public class ClientBootStrap {

    public static void main(String[] args) throws InterruptedException {

        RpcConsumer rpcConsumer = new RpcConsumer();
        //1.创建代理对象
        UserService userService = (UserService) rpcConsumer.createProxy(UserService.class,"UserService","sayHello");

        //2.循环给服务器写数据
        while (true){
            Thread.sleep(2000);
            System.out.println(userService.sayHello("are you ok?"));
        }


    }




}
